<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <jsp:include page="/static/common/common_header.jsp"/>

    <style>
        tr {
            color: #3c3c3c;
            font-family: Arial,"Microsoft YaHei","微软雅黑";
            font-size: 12px;
            font-style: normal;
        }
    </style>
    <script type="text/javascript" src="/static/plugins/artDialog/jquery.artDialog.source.js?skin=blue"></script>
    <script type="text/javascript" src="/static/plugins/artDialog/plugins/iframeTools.js"></script>
    <script type="text/javascript" src="/static/js/chart/salechart.js"></script>
    <script type="text/javascript">
        $(function(){
            //图表改变事件
            $(".chart").click(function () {

                var url = $(this).data("url");
                //打开对话框并将表单中的数据传送过去
                $.dialog.open(url+$("#searchForm").serialize(),{
                    id:"saleChartByLine",
                    title:"销售报表"
                })
            })
        })
    </script>
</head>

<body>
        <table id="salechart_datagrid"></table>
        <div id="salechart_toolbar">
            <form id="searchForm">
            机构:<input id="safetymechanism" class="easyui-combobox"
                      data-options="url:'/safetymechanism/listAll',valueField:'id',textField:'name',panelHeight:'auto'"
                      name="safetymechanismId">
            险种:<input id="product" class="easyui-combobox"
                      data-options="url:'/product/listAll',valueField:'id',textField:'name',panelHeight:'auto'"
                      name="productId">
            保单时间:<input id="beginDate" type="text" class="easyui-datebox" name="beginDate"/>
            ~ <input id="endDate" type="text" class="easyui-datebox" name="endDate"/>
                <br>
                <table>
                    <tr>
                        <td>分组:
                            <select id="groupType" class="easyui-combobox" data-options="panelHeight:'auto',width:118" name="groupType">
                                <option value="e.realName">销售人员</option>
                                <option value="s.name">保险机构</option>
                                <option value="p.name">保险产品</option>
                                <option value="date_format(ip.beginDate,'%Y-%m')">保单日期(月)</option>
                                <option value="date_format(ip.beginDate,'%Y-%m-%d')">保单日期(日)</option>
                            </select>
                        </td>
                        <td width="50px"></td>
                        <td><a class="easyui-linkbutton chart" iconCls="icon-large-chart" plain="true"
                           data-url="/chart/listbyline?">柱状图</a>
                         <td width="70px"></td>
                         <td><a class="easyui-linkbutton chart" iconCls="icon-filter" plain="true"
                           data-url="/chart/listbypie?">饼状图</a>
                         </td>
                        <td width="60px"></td>
                        <td><a class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearch()">查询</a> </td>
                    </tr>
                </table>
            </form>
        </div>
</body>
</html>
